import React, { lazy } from "react";
import { Navigate } from "react-router-dom";
const HomeIndex = lazy(() => import("../pages/home/homeIndex"));
const ListDetail = lazy(() => import("../pages/home/listDetail"));
const MoreList = lazy(() => import("../pages/home/moreList"));
const Search = lazy(() => import("../pages/home/search"));
const Tab = lazy(() => import("../pages/home/tab"));
const TabDetail = lazy(() => import("../pages/home/homeIndex"));

export const HomeRouter = [
  {
    path: "/",
    element: <Navigate to="/home"></Navigate>,
  },
  {
    path: "/home",
    element: <HomeIndex></HomeIndex>,
    meta: {
      title: "首页",
    },
  },
  {
    path: "/home/list/:id",
    element: <ListDetail></ListDetail>,
    meta: {
      title: "列表详情",
    },
  },
  {
    path: "/home/more/list",
    element: <MoreList></MoreList>,
    meta: {
      title: "首页",
    },
  },
  {
    path: "/home/tab",
    element: <Tab></Tab>,
    meta: {
      title: "tab",
    },
  },
];
